Repository navigation
Add Telr driver - #33
Merged
Merged
Conversation
Telr is a Gulf acquirer (UAE, Saudi Arabia and the wider region) on the hosted payment page. One endpoint does the work: POST /gateway/order.json, with method create for the page and check for a status read. - createPayment() returns order.ref and order.url. - Transaction advice is verified the way Telr documents it: SHA1 of the secret key followed by the fourteen transaction fields, colon-joined in order, percent-encoded values decoded first and a missing field contributing an empty value, compared in constant time. - A is paid, H is authorised but on hold and comes through pending, D, C and E fail, and anything outside the documented set is refused. - Refunds are not wrapped: Telr documents them on a different product surface, and the docs say so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Tahseel::gateway('telr')- a Gulf acquirer (UAE, Saudi Arabia, the wider region) on the hosted payment page. One endpoint does the work:POST /gateway/order.json, withmethodcreatefor the page andcheckfor a status read.createPayment()- store id and auth key in the body as Telr documents, MAJOR-unit decimal-string amounts (95.00, never9500), the three documented return urls. Returnsorder.refandorder.url.verifyAndParseWebhook()- the documented advice hash: SHA1 of the secret key followed by the fourteen transaction fields (store, type, class, test, ref, prevref, firstref, currency, amount, cartid, desc, status, authcode, authmessage) colon-joined in that order, percent-encoded values decoded first and a missing field contributing an empty value, exactly as the docs say, compared in constant time. Status set honoured:Apaid,Hauthorised-but-on-hold comes through pending,D/C/Efail, anything else refused.fetchPaymentStatus()- the documentedcheckcall; the status text is matched against the documented messages and an unrecognised one is refused.Honesty notes
Metadata
README (EN) +
docs/ar/README.mdin sync (count 22 → 23, driver table, full## Telrsection), CHANGELOG [Unreleased],composer.jsondescription + keywords (telr,uae,aed), config block +TELR_*env vars, every optional extra off by default.Tests
16 fixture tests, including the two documented hash rules (percent-decoding, empty-for-missing). Suite 609 passed / 1452 assertions, PHPStan level 8 clean, Pint clean.